﻿<%@ Page Title="IVR Junction Configuration" Language="C#" MasterPageFile="~/IVRJunctionUI.Master" AutoEventWireup="true" CodeBehind="Configuration.aspx.cs" Inherits="IVRJunctionUI.Configuration" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <center>
        <h2> Configuration Page </h2>
    </center>
    <br />
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" BackColor="Yellow"
        HeaderText="There are errors on the page:" />
    <asp:Panel ID="PanelServiceControlPanel" runat="server" BorderStyle="Solid" BackColor="#EBEBEB"
        Visible="false">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="LabelServiceControl" runat="server" Font-Bold="True" Text="IVR Junction Services Control Panel"></asp:Label>
        <asp:Table ID="TableServiceControl" runat="server" CellSpacing="20">
            <asp:TableHeaderRow runat="server" Font-Bold="true">
                <asp:TableHeaderCell> Service Name</asp:TableHeaderCell>
                <asp:TableHeaderCell> Service Description</asp:TableHeaderCell>
                <asp:TableHeaderCell> Service Control</asp:TableHeaderCell>
                <asp:TableHeaderCell> Service Status</asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow ID="TableRow5" runat="server">
                <asp:TableCell ID="TableCell53" runat="server">         
                YouTube Upload Service</asp:TableCell>
                <asp:TableCell ID="TableCell54" runat="server"> 
                This service uploads the audio files on to the YouTube channel of NGO.    
                </asp:TableCell>
                <asp:TableCell ID="TableCell55" runat="server" Font-Italic="True">
                    <asp:Button ID="ButtonYouTubeService" runat="server" Text="Button" CausesValidation="false"
                        OnClick="ButtonYouTubeService_Click" OnClientClick="return alert('Press the button only once and refresh the web page after some time');" /></asp:TableCell>
                <asp:TableCell ID="TableCell57" runat="server" Font-Italic="True">
                    <asp:Label ID="LabelYouTubeServiceStatus" runat="server" Text="Label"></asp:Label></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRowModerationService2" runat="server" Visible="false">
                <asp:TableCell ID="TableCell65" runat="server">         
                Moderator Action Analysis Service </asp:TableCell>
                <asp:TableCell ID="TableCell66" runat="server"> 
                This service analyzes the moderators' actions on YouTube Channel and take appropriate actions.    
                </asp:TableCell>
                <asp:TableCell ID="TableCell67" runat="server" Font-Italic="True">
                    <asp:Button ID="ButtonModerationService2" runat="server" Text="Button" CausesValidation="false"
                        OnClick="ButtonModerationService2_Click" OnClientClick="return alert('Press the button only once and refresh the web page after some time');" /></asp:TableCell>
                <asp:TableCell ID="TableCell68" runat="server" Font-Italic="True">
                    <asp:Label ID="LabelModerationService2" runat="server" Text="Label"></asp:Label></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRowSynchronizationService2" runat="server" Visible="false">
                <asp:TableCell ID="TableCell69" runat="server">         
                Synchronization Service </asp:TableCell>
                <asp:TableCell ID="TableCell70" runat="server"> 
                This service synchronizse the audio database of various branches using DropBox folder.    
                </asp:TableCell>
                <asp:TableCell ID="TableCell71" runat="server" Font-Italic="True">
                    <asp:Button ID="ButtonSynchronizationService2" runat="server" Text="Button" CausesValidation="false"
                        OnClick="ButtonSynchronizationService2_Click" OnClientClick="return alert('Press the button only once and refresh the web page after some time');" /></asp:TableCell>
                <asp:TableCell ID="TableCell72" runat="server" Font-Italic="True">
                    <asp:Label ID="LabelSynchronizationService2" runat="server" Text="Label"></asp:Label></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelBranch" runat="server" BorderStyle="Solid" BackColor="#EBEBEB">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="LabelBranchPanel" runat="server" Font-Bold="True" Text="Branch Configuration"></asp:Label>
        <asp:Table ID="BranchPanelTable" runat="server" CellSpacing="20">
            <asp:TableRow runat="server">
                <asp:TableCell runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please specify branch name."
                        ControlToValidate="TextBoxBranchName" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Branch Name</asp:TableCell>
                <asp:TableCell runat="server">
                    <asp:TextBox ID="TextBoxBranchName" runat="server" Text="Bangalore"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell runat="server" Font-Italic="True"> Specify the unique Branch Name for the NGO</asp:TableCell>
                <asp:TableCell ID="TableCell13" runat="server" Font-Italic="True"> </asp:TableCell>
                <asp:TableCell ID="TableCell14" runat="server" Font-Italic="True">
                    <asp:Image ID="ImageTickBranchPanel" runat="server" ImageUrl="~/Resource/Green_tick.png"
                        Width="20" Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelFacebookConfiguration" runat="server" BorderStyle="Solid" BackColor="#EBEBEB"
        Visible="false">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="LabelFBConfiguration" runat="server" Font-Bold="True" Text="Facebook Account Configuration"></asp:Label>
        <asp:Table ID="TableFBConfiguration" runat="server" CellSpacing="20">
            <asp:TableRow ID="TableRowFBConfiguration" runat="server" Visible="true">
                <asp:TableCell ID="TableCell74" runat="server" Font-Italic="True">
                <asp:HyperLink ID="HyperLinkFB" runat="server" Font-Bold='true' Target="_blank">Configure Facebook</asp:HyperLink>
                </asp:TableCell>
                <asp:TableCell ID="TableCell73" runat="server"> 
                Click this link to configure facebook account.    
                </asp:TableCell>
                <asp:TableCell ID="TableCell48" runat="server" Font-Italic="True">
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/Resource/Green_tick.png" Width="20"
                        Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelIVRFolderLocation" runat="server" BorderStyle="Solid" BackColor="#EBEBEB">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="Label1" runat="server" Font-Bold="True" Text="IVR Folder Location Configuration"></asp:Label>
        <asp:Table ID="Table1" runat="server" CellSpacing="20">
            <asp:TableRow ID="TableRow14" runat="server">
                <asp:TableCell ID="TableCell75" runat="server">
                    <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Please specify a valid IVR local folder directory"
                        ControlToValidate="TextBoxIVRFolderLocation" Font-Bold="true" ForeColor="Red"
                        ValidateEmptyText="true" Display="Static" Enabled="true" OnServerValidate="IVRFolderValidator">*</asp:CustomValidator>
                    IVR Folder Location</asp:TableCell>
                <asp:TableCell ID="TableCell76" runat="server">
                    <asp:TextBox ID="TextBoxIVRFolderLocation" runat="server" Text="C:\IVRData"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="TableCell77" runat="server" Font-Italic="True"> Specify the IVR folder location where Configuration data would be stored</asp:TableCell>
                <asp:TableCell ID="TableCell78" runat="server" Font-Italic="True"> </asp:TableCell>
                <asp:TableCell ID="TableCell79" runat="server" Font-Italic="True">
                    <asp:Image ID="ImageTickIVRFolderLocationPanel" runat="server" ImageUrl="~/Resource/Green_tick.png"
                        Width="20" Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelDropBoxConfiguration" runat="server" BorderStyle="Solid" BackColor="#EBEBEB">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="LabelDropBoxConfiguration" runat="server" Font-Bold="True" Text="SkyDrive or DropBox Configuration"></asp:Label>
        
        <asp:Table ID="TableDropBoxConfiguration2" runat="server" CellSpacing="20">
            <asp:TableRow ID="TableRow10" runat="server">
                <asp:TableCell ID="TableCell28" runat="server">
                    <asp:CustomValidator ID="CustomValidatorDropBoxFolder" runat="server" ErrorMessage="Please specify a valid SkyDrive/DropBox local folder directory."
                        ControlToValidate="TextBoxDropBoxFolderLocation" Font-Bold="true" ForeColor="Red"
                        ValidateEmptyText="true" Display="Static" Enabled="true" OnServerValidate="DropBoxFolderValidator">*</asp:CustomValidator>
                    SkyDrive or DropBox Folder Location</asp:TableCell>
                <asp:TableCell ID="TableCell29" runat="server">
                    <asp:TextBox ID="TextBoxDropBoxFolderLocation" runat="server" Text="C:\Users\t-avash\SkyDrive\IVR"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="TableCell30" runat="server" Font-Italic="True"> Sepcify the Path of Configured SkyDrive or DropBox Folder</asp:TableCell>
                <asp:TableCell ID="TableCell42" runat="server" Font-Italic="True"> </asp:TableCell>
                <asp:TableCell ID="TableCell43" runat="server" Font-Italic="True">
                    <asp:Image ID="ImageTickDropBoxFolderPanel" runat="server" ImageUrl="~/Resource/Green_tick.png"
                        Width="20" Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelYTChannelInformation" runat="server" BorderStyle="Solid" BackColor="#EBEBEB">
        <br />
        &nbsp;&nbsp;
        <asp:CustomValidator ID="CustomValidateYouTubeSettings" runat="server" ErrorMessage="YouTube Channel Information is invalid
        or Internet Connection is de-activated!" OnServerValidate="YouTubeChannelInformationValidation"
            Enabled="true" Display="Static" Font-Bold="true" ForeColor="Red">
        *</asp:CustomValidator>
        <asp:Label ID="LabelYTChannelInformation" runat="server" Font-Bold="True" Text="YouTube Channel Information"></asp:Label>
        <asp:Table ID="TableYTChannelInformation" runat="server" CellSpacing="20">
            <asp:TableRow runat="server">
                <asp:TableCell ID="TableCell37" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Please specify YouTube Developer Key."
                        ControlToValidate="TextBoxYTDeveloperKey" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Developer Key</asp:TableCell>
                <asp:TableCell runat="server">
                    <asp:TextBox ID="TextBoxYTDeveloperKey" runat="server"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell runat="server" Font-Italic="True"> Specify the Developer Key corresponding to your application</asp:TableCell>
                <asp:TableCell ID="TableCell40" runat="server"> 
                </asp:TableCell>
                <asp:TableCell ID="TableCell41" runat="server">
                    <asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="true" Text="Get YouTube Developer Key"
                        Target="_blank" NavigateUrl="http://code.google.com/apis/youtube/dashboard/gwt/index.html"></asp:HyperLink>
                </asp:TableCell>
                <asp:TableCell ID="TableCell44" runat="server" Font-Italic="True" RowSpan="4"> </asp:TableCell>
                <asp:TableCell ID="TableCell45" runat="server" Font-Italic="True" RowSpan="4">
                    <asp:Image ID="ImageTickYouTubeConfigPanel" runat="server" ImageUrl="~/Resource/Green_tick.png"
                        Width="20" Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow1" runat="server">
                <asp:TableCell ID="TableCell1" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Please specify YouTube Account Name."
                        ControlToValidate="TextBoxYTAccountName" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Account Name</asp:TableCell>
                <asp:TableCell ID="TableCell2" runat="server">
                    <asp:TextBox ID="TextBoxYTAccountName" runat="server" Text="testmsrngo"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="TableCell3" runat="server" Font-Italic="True"> Specify the Account Name of your YouTube Channel</asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow2" runat="server">
                <asp:TableCell ID="TableCell4" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Please specify YouTube Username."
                        ControlToValidate="TextBoxYTUsername" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Username</asp:TableCell>
                <asp:TableCell ID="TableCell5" runat="server">
                    <asp:TextBox ID="TextBoxYTUsername" runat="server" Text="testmsrngo"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="TableCell6" runat="server" Font-Italic="True"> Specify your YouTube Username</asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow3" runat="server">
                <asp:TableCell ID="TableCell7" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Please specify YouTube Password!"
                        ControlToValidate="TextBoxYTPassword" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Password</asp:TableCell>
                <asp:TableCell ID="TableCell8" runat="server">
                    <asp:TextBox ID="TextBoxYTPassword" runat="server" TextMode="Password"></asp:TextBox>
                </asp:TableCell>
                <asp:TableCell ID="TableCell9" runat="server" Font-Italic="True"> Specify your YouTube Password</asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelVideoProperties" runat="server" BorderStyle="Solid" BackColor="#EBEBEB">
        <br />
        &nbsp;&nbsp;
        <asp:Label ID="LabelPanelVideoProperties" runat="server" Font-Bold="True" Text="Properties of Video to be Uploaded on YouTube"></asp:Label>
        <asp:Table ID="TableVideoProperties" runat="server" CellSpacing="20">
            <asp:TableRow ID="TableRow4" runat="server">
                <asp:TableCell ID="TableCell10" runat="server">
                    <asp:CustomValidator ID="CustomValidatorFileUpload" runat="server" ErrorMessage="Please select a jpg file"
                        OnServerValidate="FileUploadBackgroundImageValidation" Enabled="true" Display="Static"
                        Font-Bold="true" ForeColor="Red" ControlToValidate="FileUploadBackgroundImage"
                        ValidateEmptyText="true">
        *</asp:CustomValidator>
                    Background Image</asp:TableCell>
                <asp:TableCell ID="TableCell11" runat="server">
                    <asp:FileUpload ID="FileUploadBackgroundImage" runat="server" />
                </asp:TableCell>
                <asp:TableCell ID="TableCellBackgroundImage" runat="server" Font-Italic="True"> Specify the image (.jpg) to be used in the video</asp:TableCell>
                <asp:TableCell ID="TableCell50" runat="server" Font-Italic="True" RowSpan="5"></asp:TableCell>
                <asp:TableCell ID="TableCell51" runat="server" Font-Italic="True"> </asp:TableCell>
                <asp:TableCell ID="TableCell52" runat="server" Font-Italic="True">
                    <asp:Image ID="ImageFromDB" runat="server" ImageUrl="~/Resource/backgroundImage.jpg"
                        Width="50" Height="50" Visible="false" /></asp:TableCell>
                <asp:TableCell ID="TableCell46" runat="server" Font-Italic="True" RowSpan="5"> </asp:TableCell>
                <asp:TableCell ID="TableCell47" runat="server" Font-Italic="True" RowSpan="5">
                    <asp:Button ID="ButtonEdit" runat="server" Text="Edit Video Information" Visible="false"
                        CausesValidation="false" OnClick="ButtonEdit_Click" />
                    <asp:Button ID="ButtonSave" runat="server" Text="Save Video Information" CausesValidation="false"
                        OnClick="ButtonSave_Click" Visible="false" /></asp:TableCell>
                <asp:TableCell ID="TableCell49" runat="server" Font-Italic="True" RowSpan="5">
                    <asp:Image ID="ImageTickYTVideoInformation" runat="server" ImageUrl="~/Resource/Green_tick.png"
                        Width="20" Height="20" Visible="false" /></asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow6" runat="server">
                <asp:TableCell ID="TableCell16" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorVideoTitle" runat="server"
                        ErrorMessage="Please specify title for a video to be uploaded on YouTube." ControlToValidate="TextBoxVideoTitle"
                        Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Title</asp:TableCell>
                <asp:TableCell ID="TableCell17" runat="server">
                    <asp:TextBox ID="TextBoxVideoTitle" runat="server" Text="Video uploded using IVR Junction"></asp:TextBox>
                    <asp:Label ID="LabelVideoTitle" runat="server" Text="Label" Visible="false" ForeColor="Blue"></asp:Label>
                </asp:TableCell>
                <asp:TableCell ID="TableCellVideoTitle" runat="server" Font-Italic="True"> Specify title of video</asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow7" runat="server">
                <asp:TableCell ID="TableCell19" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorVideoKeywords" runat="server"
                        ErrorMessage="Please specify keywords (separated by comma)." ControlToValidate="TextBoxVideoKeywords"
                        Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Keywords</asp:TableCell>
                <asp:TableCell ID="TableCell20" runat="server">
                    <asp:TextBox ID="TextBoxVideoKeywords" runat="server" Text="Citizen Journalism, Local News, IVR Junction"></asp:TextBox>
                    <asp:Label ID="LabelVideoKeywords" runat="server" Text="Label" Visible="false" ForeColor="Blue"></asp:Label>
                </asp:TableCell>
                <asp:TableCell ID="TableCellVideoKeywords" runat="server" Font-Italic="True"> Specify Keywords separate them by comma</asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow8" runat="server">
                <asp:TableCell ID="TableCell22" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorVideoDescritpion" runat="server"
                        ErrorMessage="Please specify some description for the video to be uploaded on the YouTube."
                        ControlToValidate="TextBoxVideoDescription" Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Description</asp:TableCell>
                <asp:TableCell ID="TableCell23" runat="server">
                    <asp:TextBox ID="TextBoxVideoDescription" runat="server" Text="The video is uploaded using IVR Junction. This is just to show the efficacy of IVR Junction"></asp:TextBox>
                    <asp:Label ID="LabelVideoDescription" runat="server" ForeColor="Blue"></asp:Label>
                </asp:TableCell>
                <asp:TableCell ID="TableCellVideoDescription" runat="server" Font-Italic="True"> Specify description for the video</asp:TableCell>
            </asp:TableRow>
            <asp:TableRow ID="TableRow9" runat="server">
                <asp:TableCell ID="TableCell25" runat="server">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorVideoLocation" runat="server"
                        ErrorMessage="Please specify location of upload." ControlToValidate="TextBoxVideoLocation"
                        Font-Bold="true" ForeColor="Red">*</asp:RequiredFieldValidator>
                    Location</asp:TableCell>
                <asp:TableCell ID="TableCell26" runat="server">
                    <asp:TextBox ID="TextBoxVideoLocation" runat="server" Text="Bangalore, India" ></asp:TextBox>
                    <asp:Label ID="LabelVideoLocation" runat="server" Text="Label" Visible="false" ForeColor="Blue"></asp:Label>
                </asp:TableCell>
                <asp:TableCell ID="TableCellVideoLocation" runat="server" Font-Italic="True"> Specify location to appear with video</asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>
    <br />
    <asp:Panel ID="PanelSubmitForm" runat="server">
        &nbsp;<asp:Table runat="server" CellPadding ="20">
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Button ID="ButtonSubmit" runat="server" Text="Submit" PostBackUrl="~/Configuration.aspx"
                        OnClick="ButtonSubmit_Click" Style="height: 26px" /></asp:TableCell>
                <asp:TableCell>
                    <asp:Button ID="ButtonReset" runat="server" Text="Reset" 
                    CausesValidation  ="false" OnClick="ButtonReset_Click" Style="height: 26px"/>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </asp:Panel>

</asp:Content>
